JavaScript Pad end

padEnd() pads the end of a string with a filler until it reaches a target length. It is the mirror of padStart() and is used to left-align text in fixed-width layouts.

Syntax

str.padEnd(targetLength, padString)

Examples

Input Arguments Output
"5" 3, "0" "500"

Try it live

Type your input and see Pad end transform it instantly.

Description: Pads the end of a string with a specified character to reach a specified length.

Example: 'coffee'.padEnd(10, '-') => 'coffee----'

Want to go further? Chain Pad end with other functions in the visual Playground — pipe one output into the next and watch your data transform.

Related functions

© 2026 Heifara Buval